package com.hxtec.polaris.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import javax.persistence.*;
import lombok.Data;

/**
 * @author Caps
 * @date 2019/11/29
 */
@ApiModel(value = "com.hxtec.polaris.entity.ShopProductBase")
@Data
@Table(name = "shop_product_base")
public class ShopProductBase implements Serializable {
    /**
     * 商品base主表主键
     */
    @Id
    @Column(name = "spu")
    @GeneratedValue(generator = "JDBC")
    @ApiModelProperty(value = "商品base主表主键")
    private Integer spu;

    /**
     * 分类id
     */
    @Column(name = "category_id")
    @ApiModelProperty(value = "分类id")
    private Integer categoryId;

    /**
     * 商品名称
     */
    @Column(name = "`name`")
    @ApiModelProperty(value = "商品名称")
    private String name;

    /**
     * 商品介绍
     */
    @Column(name = "detail")
    @ApiModelProperty(value = "商品介绍")
    private String detail;

    @Transient
    private List<ShopProductImage> spuImageList;

    /**
     * 创建时间
     */
    @Column(name = "create_time")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    /**
     * 修改时间
     */
    @Column(name = "update_time")
    @ApiModelProperty(value = "修改时间")
    private Date updateTime;

    /**
     * 权重
     */
    @Column(name = "weight")
    @ApiModelProperty(value = "权重")
    private Double weight;

    /**
     * 备用字段1
     */
    @Column(name = "comment1")
    @ApiModelProperty(value = "备用字段1")
    private String comment1;

    /**
     * 备用字段2
     */
    @Column(name = "comment2")
    @ApiModelProperty(value = "备用字段2")
    private String comment2;

    /**
     * 备用字段3
     */
    @Column(name = "comment3")
    @ApiModelProperty(value = "备用字段3")
    private String comment3;

    @Transient
    private List<ShopProductSaleAttr> spuSaleAttrList;

    private static final long serialVersionUID = 1L;
}
